<script type="text/javascript">
  signInVal();
</script>
<div class="col-sm-9 content-right">
  <ol class="breadcrumb">
    <li><a class="route-controller" href="<?php echo site_url('home'); ?>"><?php echo lang('home'); ?></a></li>
    <li><?php echo lang('sign_in'); ?></li>
  </ol>
  <h4><?php echo lang('sign_in'); ?></h4>
  <p><?php echo lang('sign_in_caption'); ?></p>
  <div class="row">
    <div class="col-md-12">
      <div class="well clearfix">
        <form id="sign_in_form" action="<?php echo site_url('signin'); ?>" method="post" role="form">
          <input type="hidden" name="redirect_to" id="redirect_to" value="<?php echo $this->redirect_to; ?>"/>
          <?php $user_email_error = form_error('user_email'); ?>
          <div class="form-group <?php if ($user_email_error) { ?> has-error <?php } ?>">
            <label class="control-label" for="user_email"><?php echo lang('email'); ?></label>
            <input class="form-control" name="user_email" id="user_email" placeholder="Email" type="email" required="true" value="<?php echo set_value('user_email'); ?>" <?php if ($user_email_error) { ?> autofocus="true" <?php } ?>/>
            <?php if ($user_email_error) { ?>
              <small class="help-block" data-bv-validator="serverValidation"><?php echo $user_email_error; ?></small>
            <?php } ?>
          </div>
          <?php $user_password_error = form_error('user_password'); ?>
          <div class="form-group <?php if ($user_password_error) { ?> has-error <?php } ?>">
            <label class="control-label" for="user_password"><?php echo lang('password'); ?></label>
            <input class="form-control" name="user_password" id="user_password" placeholder="Password" type="password" required="true" autofocus="true" <?php if ($user_password_error) { ?> autofocus="true" <?php } ?>/>
            <?php if ($user_password_error) { ?>
              <small class="help-block" data-bv-validator="serverValidation"><?php echo $user_password_error; ?></small>
            <?php } ?>
          </div>
          <?php if (!empty($user_security)) { ?>
            <?php $user_security_error = form_error('security_error'); ?>
            <div class="form-group <?php if ($user_security_error) { ?> has-error <?php } ?>">
              <label class="control-label" for="user_security_answer"><?php echo $user_security['question_one']; ?> + <?php echo $user_security['question_two']; ?> =</label>
              <input class="form-control" name="user_security_answer" id="user_security_answer" placeholder="Security Answer" type="number" required="true" <?php if ($user_security_error) { ?> autofocus="true" <?php } ?>/>
              <?php if ($user_security_error) { ?>
                <small class="help-block" data-bv-validator="serverValidation"><?php echo $user_security_error; ?></small>
              <?php } ?>
            </div>
          <?php } ?>
          <span class="text-info"><a class="route-controller" href="<?php echo site_url('password/reset'); ?>"><i class="fa fa-external-link"></i>&nbsp;<span><?php echo lang('password_reset'); ?></span></a></span>
          <div class="pull-right">
            <button class="btn btn-danger" type="submit"><i class="fa fa-sign-in"></i>&nbsp;<span><?php echo lang('sign_in'); ?></span></button>
          </div>
        </form>
      </div>
    </div>
  </div>
  <hr>
  <p><?php echo lang('sns_sign_in_up'); ?></p>
  <div class="row">
    <div class="col-sm-12">
      <div class="well clearfix">
        <p class="col-sm-6">
          <a title="<?php echo lang('sign_in_up_via_facebook'); ?>" href="<?php echo site_url('auth/facebook'); ?>" class="btn btn-primary btn-block"><i class="fa fa-facebook-square"></i>&nbsp;<span>Facebook</span></a>
        </p>
        <p class="col-sm-6">
          <a title="<?php echo lang('sign_in_up_via_google'); ?>" href="<?php echo site_url('auth/google'); ?>" class="btn btn-primary btn-block"><i class="fa fa-google-plus-square"></i>&nbsp;<span>Google</span></a>
        </p>
      </div>
    </div>
  </div>
</div>